package das;

import java.util.Scanner;

public class Denglu {
	static boolean biaoshi = false;
	public static void login(int id) {
		System.out.println("[会员系统>>登陆]");
		if (Zhuche.biaoshi = true) {
			System.out.println("请输入用户名：");
			Scanner input_name = new Scanner(System.in);
			String name = input_name.nextLine();
			
			System.out.println("请输入密码：");
			Scanner input_pwd = new Scanner(System.in);
			String pwd = input_pwd.nextLine();
			
			if (Zhuche.user.equals(name) && Zhuche.password.equals(pwd)) {
				System.out.println("**********************************");
				System.out.println("\t欢迎" + name + "登陆系统!");
				System.out.println("**********************************");
				System.out.println("你的会员卡号是：" + Zhuche.kahao);
				biaoshi = true;
				Choujiang.goDraw(id+1);
			} else {
				System.out.println("账号密码错误，已退出！");
			}
		}else {
			System.out.println("请先注册，再登陆！");
			String answer = Chesi.dado();
			if ("n".equals(answer)) {
				System.out.println("***********************");
				System.out.println("系统退出,谢谢使用!");
			} else if ("y".equals(answer)) {
				Zhuche.reg(id-1);
			}
		}
	}
	
}
